home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Choice 3
/
Your Choice Software Collection 3.iso
/
os2
/
new_api
/
21newapi.doc
Wrap
Text File
|
1994-04-03
|
10KB
|
320 lines
================================================
21newapi.doc -- What APIs are new to OS/2 2.1?
================================================
Compiled by Marc E.E. van Woerkom , 4/94
Usenet: marc_van-woerkom@ac3.maus.de
marc@pxcl1.gi.rwth-aachen.de
SECTION ONE: DOCUMENTED NEW FEATURES
====================================
Source: OS/2 2.1 CP Programming Reference
-----------------------------------------
New CP APIs:
o DosProtectClose() -- Close a Handle to a File, Pipe, or Device
APIRET DosProtectClose(HFILE hFile, FHLOCK fhFileHandleLockID)
DosProtectClose closes a handle to a file, pipe, or device.
o DosProtectEnumAttribute() -- Identify Names and Lengths of Extended
Attributes
APIRET DosProtectEnumAttribute(ULONG ulRefType, PVOID pvFile,
ULONG ulEntry, PVOID pvBuf,
ULONG cbBuf, PULONG pulCount,
ULONG ulInfoLevel,
FHLOCK fhFileHandleLockID)
DosProtectEnumAttribute identifies names and lengths of extended
attributes for a specific file or subdirectory.
o DosProtectOpen() -- Open a File and Return a Protected File Handle
APIRET DosProtectOpen(PSZ pszFileName, PHFILE phf, PULONG Action,
ULONG cbFile, ULONG ulAttribute,
ULONG fsOpenFlags, ULONG fsOpenMode,
PEAOP2 peaop2, PFHLOCK pfhFileHandleLockID)
DosProtectOpen opens a new file, an existing file, or a replacement for
an existing file and returns a protected file handle. An open file can
have extended attributes.
o DosProtectQueryFHState() -- Query File Handle State
APIRET DosProtectQueryFHState(HFILE FileHandle,
PULONG FileHandleState,
FHLOCK fhFileHandleLockID)
DosProtectQueryFHState queries the state of the specified protected file
handle.
o DosProtectQueryFileInfo() -- Query File Information
APIRET DosProtectQueryFileInfo(HFILE hf, ULONG ulInfoLevel,
PVOID pInfo, ULONG cbInfoBuf,
FHLOCK fhFileHandleLockID)
DosProtectQueryFileInfo gets file information.
o DosProtectRead() -- Read from a File, Pipe, or Device to a Buffer
APIRET DosProtectRead(HFILE hFile, PVOID pBuffer, ULONG cbRead,
PULONG pcbActual, FHLOCK fhFileHandleLockID)
DosProtectRead reads the specified number of bytes from a file, pipe, or
device to a buffer location.
o DosProtectSetFHState() -- Set the State of a Specified Protected File
Handle
APIRET DosProtectSetFHState(HFILE FileHandle, ULONG FileHandleState,
FHLOCK fhFileHandleLockID)
DosProtectFHState sets the state of the specified protected file handle.
o DosProtectSetFileInfo() -- Set File Information
APIRET DosProtectSetFileInfo(HFILE hf, ULONG ulInfoLevel,
PVOID pInfoBuf, ULONG cbInfoBuf,
FHLOCK fhFileHandleLockID)
DosProtectSetFileInfo sets file information.
o DosProtectSetFileLocks() -- Lock and Unlock a Range of an Open File
APIRET DosProtectSetFileLocks(HFILE hFile, PFILELOCK pflUnLock,
PFILELOCK pflLock, ULONG timeout,
ULONG flags, FHLOCK fhFileHandleLockID)
DosProtectSetFileLocks locks and unlocks a range of an open file.
o DosProtectSetFilePtr() -- Move the Read/Write Pointer
APIRET DosProtectSetFilePtr(HFILE FileHandle, LONG Distance,
ULONG MoveType, PULONG NewPointer,
FHLOCK fhFileHandleLockID)
DosProtectSetFilePtr moves the read or write pointer according to the type
of move specified.
o DosProtectSetFileSize() -- Change the Size of a File
APIRET DosProtectSetFileSize(HFILE hFile, ULONG cbFile,
FHLOCK fhFileHandleLockID)
DosProtectSetFileSize changes the size of a file.
o DosProtectWrite() -- Write to a File from a Buffer
APIRET DosProtectWrite(HFILE hFile, PVOID pBuffer, ULONG cbWrite,
PULONG pcbActual, FHLOCK fhFileHandleLockID)
DosProtectWrite writes a specified number of bytes from a buffer to the
specified file.
Source: OS/2 2.1 PM Programming Reference Vol. I
------------------------------------------------
(no 2.1 specific information found)
Source: OS/2 2.1 PM Programming Reference Vol. II
-------------------------------------------------
New PM APIs:
o WinCheckInput() -- Check Input Event Sources
BOOL WinCheckInput(HAB hab)
This function is used in conjunction with the MsgInputHook hook to input
simulated events into the Presentation Manager input processing system.
o WinLockPointerUpdate() -- Change the Mouse Pointer into a Symbol
BOOL WinLockPointerUpdate(HWND hwndDesktop, HPOINTER hptrNew,
ULONG ulTimeInterval)
This function causes the mouse pointer to change into the symbol described
by hptrNew for the period of time indicated by ulTimeInterval.
o WinLockupSystem() -- Lock Up System
BOOL WinLockupSystem(HAB hab)
This function locks up the system.
o WinQuerySysPointerData() -- Return Icon Data for Specified System Pointer
BOOL WinQuerySysPointerData(HWND hwndDesktop, ULONG iptr,
PICONINFO pIconInfo)
This function returns the icon data for the specified system pointer for
application use.
o WinSetPointerOwner() -- Set Pointer Owner
BOOL WinSetPointerOwner(HPOINTER hptr, PID pid, BOOL fDestroy)
This function allows an appplication to declare that a pointer it created
can now be used by ANY process in the system (not just the process that
created the pointer).
o WinSetSysPointerData() -- Set System Pointer to New Icon
BOOL WinSetSysPointerData(HWND hwndDesktop, ULONG iptr,
PICONINFO pIconInfo)
This function sets the given system pointer to the new icon specified by
the ICONINFO structure.
o WinUnlockSystem() -- Unlock System
BOOL WinUnlockSystem(HAB hab, PSZ pszPassword)
This function causes an application program to attempt to unlock the
system.
New WPS classes/methods:
WPDataFile.wpQueryAssociatedProgram
.wpSetAssociatedFileIcon
WPDisk.wpEjectDisk
.wpLockDrive
.wpQueryDriveLockStatus
WPObject.wpQueryDefStatusView
.wpSetDefStatusView
WPPower.wpAddPowerPage
.wpAddPowerViewPager
.wpChangePowerState
.wpQueryAutoRefresh
.wpQueryPowerConfirmation
.wpQueryPowerManagement
.wpQueryRefreshRate
.wpSetAutoRefresh
.wpSetPowerConfirmation
.wpSetPowerManagement
.wpSetRefreshRate
Source: OS/2 2.1 PM Programming Reference Vol. III
--------------------------------------------------
New system hooks:
o FlushBufHook() -- Flush Buffer
BOOL FlushBufHook(HAB hab)
This hook allows applications to save data before the system reboots.
o LockupHook() -- Lockup Hook
VOID LockupHook(HAB hab, HWND hwndLockupFrame)
This hook is called when the system locks itself up.
o MsgInputHook() -- Message Input Hook
BOOL MsgInputHook(HAB hab, PQMSG pQmsg, BOOL fSkip, PBOOL pfNoRecord)
This hook allows applications to inject one or more events into the
system input queue without having to use a journal hook, nor write to the
PM input queue directly.
New PM messages:
WM_MOUSEMAP -- Remap a mouse message in the PM input queue
New Data Types:
MT -- A menu template
WPPower* -- pointer to an instance of WPPower
Source: OS/2 2.1 Toolkit - Getting Started
------------------------------------------
New Physical Device Driver IOCtls:
o Lockable Drive IOCtls
Category 8, Function 40H -- Unlock, Lock, and Eject Media
Category 8, Function 5DH -- Diskette Control
Category 8, Function 66H -- Query Lock Status
o Power Management IOCtls
Category 12, Function 40H -- Send Power Event
Category 12, Function 41H -- Set Power Event Resource
Category 12, Function 60H -- Query Power Status
Category 12, Function 61H -- Query Power Event
Category 12, Function 62H -- Query Power Info
o CD-ROM IOCtls
Category 08H, Function 63H -- Get Device Parameters
Category 80H, Function 40H -- Reset Drive
Category 80H, Function 44H -- Eject Disk
Category 80H, Function 46H -- Lock/Unlock Door
Category 80H, Function 50H -- Seek
Category 80H, Function 60H -- Device Status
Category 80H, Function 61H -- Identify CD-ROM Driver
Category 80H, Function 63H -- Return Sector Size
Category 80H, Function 70H -- Location of Drive Head
Category 80H, Function 72H -- Read Long
Category 80H, Function 78H -- Return Volume Size
Category 80H, Function 79H -- Get UPC
Category 81H, Function 40H -- Audio Channel Control
Category 81H, Function 50H -- Play Audio
Category 81H, Function 51H -- Stop Audio
Category 81H, Function 52H -- Resume Audio
Category 81H, Function 60H -- Return Audio-Channel Information
Category 81H, Function 61H -- Return Audio-Disk Information
Category 81H, Function 62H -- Return Audio-Track Information
Category 81H, Function 63H -- Return Audio-Subchannel Q Information
Category 81H, Function 65H -- Return Audio-Status Information
Category 82H, Function 60H -- Return Drive-Letter Information